﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Microsoft.Xna.Framework.Graphics
{
	/// <summary>
	/// Queries and prepares resources.
	/// </summary>
    public class GraphicsResource : IDisposable
    {
		/// <summary>
		/// Gets the GraphicsDevice associated with this GraphicsResource.
		/// </summary>
        public GraphicsDevice GraphicsDevice { get; internal set; }

		/// <summary>
		/// Gets the name of the resource.
		/// </summary>
		public string Name { get; set; }

		/// <summary>
		/// Gets the resource tags for this resource.
		/// </summary>
		public object Tag { get; set; }

		/// <summary>
		/// Occurs when Dispose is called or when this object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime.
		/// </summary>
		public event EventHandler Disposing;

        protected bool _isDisposed = false;

        public void Dispose()
        {
            if (Disposing != null)
                Disposing(this, null);
            Dispose(false);
        }

        protected virtual void Dispose(bool disposing)
        {
        }
    }
}
